<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport"
				content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>全国青少年电子信息智能创新大赛</title>
	<link rel="icon" href="./images/logo.png">
	<link rel="stylesheet" href="./lib/layui/css/modules/layer/default/layer.css">
	<link rel="stylesheet" href="./lib/layui/css/layui.css">
	<link rel="stylesheet" href="./css/exam.css">
	<link rel="stylesheet" href="./lib/layui/css/modules/layer/default/layer.css">
	<script src="./lib/layui/layui.js"></script>
	<script src="./lib/layui/lay/modules/layer.js"></script>
</head>
<body>
<section class="wrapper" v-cloak>
	<section class="content">
		<section class="container">
			<section class="breadcrumb">
				<img src="./images/loc.png" alt="">
				<section>
					赛项 > 参赛详情 > <a href="javascript:;">在线答题</a>
				</section>
			</section>
		</section>
		<section class="container answer-content">
			<section class="answer-timer">
				<section class="top">
					<img src="./images/icons/timer.png" alt="">
					<section class="time">
						<span>用时</span>
						<section class="time-bar">
							{{ getTime(time) }}
						</section>
					</section>
				</section>
				<section class="answer-progress">
<!--					答题进度（共{{ questionList.length }}题）-->
				</section>
<!--				<section class="progress">-->
<!--					<section class="progress-bar" :style="{width: (index + 1) / questionList.length * 100 + '%'}"></section>-->
<!--				</section>-->
			</section>
			<section class="list">
<!--				<section class="title"><img src="./images/icons/score.png" alt="">Scratch编程挑战赛初赛</section>-->
				<section class="question">
					<section class="done">
						<section class="scores">
							<section class="title">总分</section>
							<section class="score">{{ score }}</section>
						</section>
						<!--<a class="btn" :href="'./game-details.html?id=' + matchId">返回参赛详情</a>-->
					</section>
				</section>
			</section>
		</section>
	</section>
</section>
<script src="./js/jquery.min.js"></script>
<script src="./lib/layui/layui.js"></script>
<script src="./lib/layui/lay/modules/layer.js"></script>
<script src="./js/vue.min.js"></script>
<script src="../js/abkj/fun_tool.js"></script>
<script src="./js/common.js"></script>
<script src="../js/abkj/ext/news.js"></script>
<script src="./components/index.js"></script>
<script>
	$(function () {
		var toDouble = num => {
			return num >= 10 ? num : '0' + num
		}
		var getTime = function (seconds) {
			if (seconds < 3600) {
				var minutes = parseInt(seconds / 60)
				var sec = parseInt(seconds % 60)
				return `${toDouble(minutes)}:${toDouble(sec)}`
			}
			var hours = parseInt(seconds / 3600)
			var remain = seconds - hours * 3600
			return toDouble(hours) + ':' + getTime(remain)
		}
		var tool = fun_tool()
		var vm = new Vue({
			el: '.wrapper',
			data: {
				time: tool.getUrlParam('time'),
				matchId: tool.getUrlParam('matchId'),
				score: tool.getUrlParam('score'),
				done: true,
			},
			methods: {
				getTime: getTime,
			}
		})
	})
</script>
</body>
</html>
